﻿@model Gfw.Web.Models.Account.UserRechargeModel

@{
    ViewBag.Title = "会员充值";
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>会员充值</legend>

        @Html.HiddenFor(model => model.LoginName)
        @Html.HiddenFor(model => model.UserID)
        @Html.HiddenFor(model => model.HandlerID)
        @Html.HiddenFor(model => model.Status)

        <div class="editor-label">
            @Html.LabelFor(model => model.BankName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BankName)
            @Html.ValidationMessageFor(model => model.BankName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BankCardNo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BankCardNo)
            @Html.ValidationMessageFor(model => model.BankCardNo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BankUserName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BankUserName)
            @Html.ValidationMessageFor(model => model.BankUserName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.RechargeMoney)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.RechargeMoney)
            @Html.ValidationMessageFor(model => model.RechargeMoney)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BankSerialNo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BankSerialNo)
            @Html.ValidationMessageFor(model => model.BankSerialNo)
        </div>

        <p>
            <input type="submit" value="充值" onclick="this.disabled = true; this.form.submit();"/>
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("返回上一页", "RechargeIndex", new { loginName = Model.LoginName, userID = Model.UserID})
     | 
    @Html.ActionLink("返回至会员管理", "Index", new { loginName = Model.LoginName})
</div>

@section Scripts {
    @System.Web.Optimization.Scripts.Render("~/bundles/jqueryval")
}


@{
    if (ViewBag.Done)
    {
    <div id="dialog" title="Dialog Title">
        <h5>
            @{
        if (ViewBag.Done)
        {
                @:充值成功
            }
        else
        {
                @:充值失败
            }
            }
        </h5>
        <div>
            <button onclick="javascript:closedialog()">确定</button>
        </div>
    </div>
    <script type="text/javascript">

        $(document).ready(function () {
            $("#dialog").dialog({ title: "操作提示", modal: true });
        });

        function closedialog() {
            $("#dialog").dialog("close");
        }
    </script>
    }
}
